# import requests
# from m3u8 import M3U8
#
# with open('./mjtt/spiders/数据/index.m3u8','r') as f:
#     index_m3u8 = f.read()
#
# hearder_url = 'https://vip.lz-cdn4.com/20220521/13343_21556af8/'
# m3u8 = M3U8(index_m3u8)
# for i in m3u8.playlists:
#     url = hearder_url + i.uri
# print(url)

import os
all_items = os.listdir('./mjtt/spiders/数据/')
ts = open('./mjtt/spiders/数据/视频.ts','ab')
for i in all_items:
    with open(f'./mjtt/spiders/数据/{i}','rb') as f:
        aont = f.read()
    ts.write(aont)
    print(f'{i}写入完成')
ts.close()